import request from '@/utils/request'
//import http from '@utils/http-request'


export function getRoles() {
  return request({
    url: '/superManager/getAllRoleInfos',
    method: 'get',
  })
}

export function login(data) {
  return request({
    url: 'getTokenByUserName',
    method: 'post',
    data
  })
}

export function getInfo() {
  return request({
    url: 'getUserInfoByToken',
    method: 'get',
  })
}

export function logout(token) {
  return request({
    url: '/logout',
    method: 'delete',
    //params: { token }
  })
}
